﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TimeAxis.Admin.Manager
{
    public partial class ProjectDelete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["docid"]))
            {
                DavidDB.ADO.DBManager db = new DavidDB.ADO.DBManager();
                Models.Category c = new Models.Category();
                c.Id = Convert.ToInt32(Request.QueryString["docid"]);
                Interfaces.ICategory iCategory = Impls.ImplCategory.GetInstance(db);
                iCategory.Delete(c);
                db.Commit();
                db.Dispose();
                Response.Redirect("ProjectManager.aspx");
            }
        }
    }
}